package service;


import dao.impl.StudentDao;
import dao.impl.StudentDaoImpl;
import entity.Student;
import java.sql.SQLException;

public class StudentServiceImpl implements service.impl.StudentService {
    private StudentDao studentDao =  new StudentDaoImpl();
    public StudentServiceImpl() throws SQLException, ClassNotFoundException {
    }
    @Override
    public int add(Student student) throws SQLException, ClassNotFoundException {
//        调用数据访问层的添加方法
        return studentDao.add(student);

    }

    @Override
    public Student login(String studentName, String studentPassword) throws SQLException {

        return studentDao.login(studentName,studentPassword);
    }
}

